home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
castools.zip
/
FUNCFH.ASM
< prev
next >
Wrap
Assembly Source File
|
1989-10-17
|
2KB
|
62 lines
Include multi.inc
Include model.inc
;==============================================================================
;
; CAS function Fh -- Get/Set Autoreceive State
;
; Format:
; int CASAutoReceiveState (BYTE mode, BYTE *rings)
; Input:
; mode (get or set), pointer to rings variable
; Output:
; Returns 0 if successful or negative error code,
; gets or sets autoreceive state.
;==============================================================================
.CODE
CASAutoReceiveState PROC arg1:BYTE, arg2:PTR BYTE
push di ; save registers
push es
mov ax,MUX ; load multiplex number
mov ah,al ; move into ah
mov al,0Fh ; CAS function F
mov dl,arg1 ; mode
cmp dl,1 ; set autoreceive?
je SET ; get autoreceive state
GET:
int 2Fh
IF @DataSize ; large and medium models
les di,arg2 ; pointer to rings variable
mov es:[di],ax ; number of rings
ELSE
mov di,arg2 ; small model
mov [di],ax ; number of rings
ENDIF
jmp RETVAL
SET:
IF @DataSize ; large and medium models
les di,arg2 ; pointer to rings variable
mov dh,es:[di] ; load number of rings
ELSE
mov di,arg2 ; small model
mov dh,[di] ; load number of rings
ENDIF
int 2Fh
RETVAL:
cmp ax,0 ; ax = 0?
jle FINISH ; don't touch ax if <= 0
mov ax,1 ; autoreceive on
FINISH:
pop es ; restore registers
pop di
ret
CASAutoReceiveState endp
END